package com.ruxiaoxin.share.service.user.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruxiaoxin.share.domain.user.User;
import com.ruxiaoxin.share.persist.user.UserRepository;
import com.ruxiaoxin.share.service.user.UserService;

/**
 * @author ruxiaoxin
 */
@Service
public class UserServiceImpl implements UserService {

	@Autowired
	UserRepository userRepository;

	@Override
	public void save(User entity) {
		userRepository.save(entity);
		
	}

	@Override
	public void delete(User entity) {
		userRepository.delete(entity);
		
	}

	@Override
	public User get(String id) {
		return userRepository.get(id);
	}

	@Override
	public void update(User entity) {
		userRepository.update(entity);		
	}

	@Override
	public User getByEmail(String email) {
		return userRepository.getByEmail(email);	
	}

}
